import { _decorator, Component, Label, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('Tile')
export class Tile extends Component {

    set indexXZ(value: [number, number]) {
        this.setIndexLabel(JSON.stringify(value))
        this._indexXZ = value;
    }

    @property([Number, Number])
    get indexXZ() {
        return this._indexXZ
    }

    @property([Number, Number])
    _indexXZ: [number, number]

    start() {

    }
    setIndexLabel(value: string) {
        this.node.getChildByName('Node').getChildByName('Label').getComponent(Label).string = value
    }
    update(deltaTime: number) {

    }
}


